/*
 * Problem:
 * given you a set of integers: S, find whether exists a subset 
 * of S whose sum equals to a given value
 *
 * POINT: dfs
 */

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define M 64
int set[M];
int n, sum, flag;
void
dfs(int depth, int cursum) //double recursion
{
	if(cursum == sum)
		flag = 1;
	if(depth >= n)
		return;
	dfs(depth+1, cursum); //don't choose set[depth]
	if(cursum+set[depth]<=sum && !flag)
		dfs(depth+1, cursum+set[depth]); //choose set[depth]
}

void
dfs_2(int depth, int cursum) //loop plus single recursion
{
	int i;
	if(cursum == sum)
		flag = 1;
	for(i=depth; i<n; i++) 
		dfs_2(i+1, cursum+set[depth]);
}

int
main(int argc, char **argv)
{
	int i;
	while(scanf("%d", &n)!=EOF && n!=0) {
		memset(set, 0, sizeof(int)*M);
		flag = 0;
		for(i=0; i<n; i++)
			scanf("%d", set+i);
		scanf("%d", &sum);
		//if sort descent before dfs, could improve efficient of search
		dfs_2(0, 0);
		printf(flag ? "Exist\n" : "Doesn't Exist\n");
	}
	return 0;
}
